<?php
if (!defined('IN_XLP')) {
    exit('Access Denied');
}
$Document = array(
    'pageid' => 'index-search', //页面标示
    'pagename' => '', //当前页面名称
    'mycss' => array('mobile/style'), //加载的css样式表
    'myjs' => array('global/jquery-1.9.0.min','global/layer/layer'), //加载的js脚本
    'footerjs'=>array(),
    'head'=>true//是否加载头部文件
);
include getTpl('header', 'public');
?>
<style type="text/css">
    .price_am b{ margin-left: 5px; background: none;}
    .price_am .ji {background: #ff8400}
    .price_am .ling {background: #0096ff}
    .price_am .bao {background: #72b601}
    .price_am .shang {background: #de00ff}
    .uu{ color: #de00ff }
    .dd{ color: #72b601 }
    .uoo{ color: #0096ff }
    .ee{ color: #ff8400 }
    .hide{display: none;}
</style>
<body>
<?php include getTpl('select', 'public'); ?>
<div id="content"> </div>
<!-- 底部 -->
<?php include getTpl('footer', 'public'); ?>
<!-- END -->
<div>
    <div class="overlay"></div>
    <div class="limit">
        <h2>访问受限提示</h2>
        <div>
            <p>亲，您的访问频率过高，当前ip在1分钟访问<br>
                <b>次数已达到<span id="co">0</span>次，最多允许<span id="lim">0</span>次</b></p>
            <p>如果此限制影响了您的正常使用，<br>
                您可以选择开通vip获得特权~</p>
        </div>
        <!-- <button><img src="<?php echo IMG_PATH ?>mobile/mkt.png"/></button> -->
        <div class="close"></div>
    </div>
</div>
<script>
    
    getData();

    //获取实时数据
    function getData() {
        var url = "<?php echo U('index/getRealData') ?>";
        var index = layer.load(1, {
          shade: [0.1,'#fff'] //0.1透明度的白色背景
        });
        $.post(url, $('#searchForm').serialize(), function(result){
            layer.close(index);
            if(result.status == 1){
                $("#content").html(result.data);
            }else{
                $(".overlay").addClass('pop_in');
                $(".limit").addClass('pop_in');
                $("#co").text(result.data.count);
                $("#lim").text(result.data.limit);
                var str = "<div class=\"list_none\"><img src='/statics/default/images/mobile/no_search.png'></div>";
                $("#content").html(str);
            }
        },'json');
    }

    $(function(){
        $(".close").click(function(){
            $(".overlay,.limit").removeClass("pop_in");
        })
    });
</script>
</body>
</html>